$(document).ready(function(){
	
	$("#adminForm").validate({
		rules: {
			firstName: {
				required: true,
				minlength: 2,
				lettersonly: true
			},
			messages: {
			    firstName: {
			      required: "Naber abi"
			    }
			},
			lastName: {
				required: true,
				minlength: 2,
				lettersonly: true
			},
			phoneNumber: {
				required: true,
				phoneUS: true
			},
			company:{
				companyName: "required"
			}
		}
	});
	
	$("#visitorForm").validate({
		rules: {
			firstName: {
				required: true,
				minlength: 2,
				lettersonly: true
			},
			lastName: {
				required: true,
				minlength: 2,
				lettersonly: true
			},
			phoneNumber: {
				required: true,
				minlength: 2,
				phoneUS: true
				
			},
			companyName: {
				required: true
			}
		}
	});
});

 $(document).ready(function(){
	
	 $("#datepicker").datepicker({
	        showOn: 'button',
	        buttonText: 'Show Date',
	        buttonImageOnly: true,
	        buttonImage: 'http://jqueryui.com/resources/demos/datepicker/images/calendar.gif'
	 });
	 
	/*$("#datepicker").datepicker({
		beforeShow: function(input, inst)
	    {
	        inst.dpDiv.css({marginTop: -input.offsetHeight + 'px', marginLeft: input.offsetWidth + 'px'});
	    },
		dateFormat: "dd-mm-yy",
		onSelect: function(dateText, inst) {
			$("#visitingDate").datepicker("setDate", new Date);
			
			//var dateText1 = $.datepicker.formatDate("D, d M yy", date, inst.settings);
			//var dateText2 = $.datepicker.formatDate("D, d M yy", date, inst.settings);
		},
	});*/
});









